#ifndef PERCEPCIONLR2_H
#define PERCEPCIONLR2_H

#include <Arduino.h>
#include <math.h>
#include "sensorIR.h"
#include "sensorUS.h"
#include "servoMotor.h"
#include "definicion.h"

class percepcionLR2{

public:
	percepcionLR2();
	void inicializarSistemaPerecepcion();
	unsigned short int obtenerMedidaUS(int idUS);
	uint8_t obtenerMedidaIR(int idIR);
	unsigned short int obtenerMedidaUSTrasero(int angulo);
	unsigned short int* obtenerBarridoFrontalUS();
	uint8_t* obtenerBarridoFrontalIR();
	unsigned short int* obtenerBarridoTraseroUS();
	~percepcionLR2();

private:
	sensorUS sensoresUS[9];
	sensorIR sensoresIR[6];
	servoMotor servoUS;
	unsigned short int filtroUS(int idUS);
	uint8_t filtroIR(int idIR);

};

#endif
